#ifndef _FW_XML_H_
#define _FW_XML_H_

//configs
#ifdef TIXML_USE_STL
#include <iostream>
#include <sstream>
using namespace std;
#else
#include <stdio.h>
#endif

//#define TUNE

#if defined( WIN32 ) && defined( TUNE )
#include <crtdbg.h>
_CrtMemState startMemState;
_CrtMemState endMemState;
#endif

//include
#include "tinyxml.h"

//test
int test_xml( int argc, char** argv )
{
	TiXmlDocument doc( "0001.xml" );
	if(!doc.LoadFile())
	{
		printf("Could not load XML!\n");
		getchar();
		return 1;
	}

	TiXmlNode *alto = doc.FirstChild("alto");

	for(TiXmlElement *e = alto->FirstChildElement();e;e=e->NextSiblingElement())
	{
		printf(" %s, ",e->Value());
	}

	//TiXmlNode *alto = doc.FirstChild("alto");

#if defined( WIN32 ) && defined( TUNE )
	_CrtMemCheckpoint( &endMemState );
	//_CrtMemDumpStatistics( &endMemState );

	_CrtMemState diffMemState;
	_CrtMemDifference( &diffMemState, &startMemState, &endMemState );
	_CrtMemDumpStatistics( &diffMemState );
#endif

	getchar();
	return 0;
}

#endif